package com.centaline.androidsalesblog.api.usercenter;

import com.android.volley.Request;
import com.centaline.androidsalesblog.api.UserCenterApi;
import com.centaline.androidsalesblog.model.responseobject.SimpleUserCenterRo;
import com.centanet.framework.interfaces.IResponseListener;

/**
 * 更新收藏信息(收藏or取消)
 * Created by guilin on 16/3/21.
 */
public class UpdateCollectApi extends UserCenterApi<SimpleUserCenterRo> {

    private String collectID;
    private int isDel;//0:收藏;1:取消收藏

    public UpdateCollectApi(Class<?> tag, Class<SimpleUserCenterRo> aClass, IResponseListener<SimpleUserCenterRo> iResponseListener) {
        super(tag, aClass, iResponseListener);
    }

    public void setCollectID(String collectID) {
        this.collectID = collectID;
    }

    public void setIsDel(int isDel) {
        this.isDel = isDel;
    }

    @Override
    protected int getMethod() {
        return Request.Method.POST;
    }

    @Override
    protected void setParams() {
        putParams("CollectID", collectID);
        putParams("IsDel", isDel);
    }

    @Override
    protected String getPath() {
        return "UpdateCollectInfoStatusRequest";
    }
}
